<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        //同步
        // console.log("1")
        // console.log("2")
        // console.log("3")
        // console.log("4")
        // console.log("5")
        // console.log("6")
        
        //异步
        setTimeout(() => {
            console.log("给1发短信")
        }, 200);
        setTimeout(() => {
            console.log("给2发短信")
        }, 500);
        setTimeout(() => {
            console.log("给3发短信")
        }, 2000);
        setTimeout(() => {
            console.log("给4发短信")
        }, 100);
        // return只能返回同步的数据
    </script>
</body>
</html>